home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat3 / alarm.3 < prev    next >
Encoding:
Text File  |  1993-03-03  |  1.4 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ALARM(3)            MINTLIB LIBRARY FUNCTIONS            ALARM(3)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        alarm - set a process alarm clock
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        #include <unistd.h>
  12.  
  13.        unsigned alarm(unsigned sec);
  14.  
  15. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  16.        alarm  instructs the alarm clock of the calling process to
  17.        send the signal SIGALRM to the calling process  after  the
  18.        number of real time seconds specified by sec have elapsed.
  19.        When 32-bit integers are used, the largest value  that  is
  20.        allowed  for  sec  is (2^31 - 1) / 1000; larger values are
  21.        silently rounded down.   Thus,  the  longest  alarm  takes
  22.        about 3 weeks to deliver.
  23.  
  24.        Alarm requests are not stacked; successive calls reset the
  25.        alarm clock of the calling process.
  26.  
  27.        If sec is 0, any previously made  alarm  request  is  can-
  28.        celled.
  29.  
  30. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  31.        p✓pa✓au✓us✓se✓e(✓(3✓3)✓),✓, s✓si✓ig✓gn✓na✓al✓l(✓(3✓3)✓),✓, s✓si✓ig✓gp✓pa✓au✓us✓se✓e(✓(3✓3)✓),✓, s✓si✓ig✓gs✓se✓et✓t(✓(3✓3)✓),✓, T✓Ta✓al✓la✓ar✓rm✓m(✓(2✓2)✓)
  32.  
  33. R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
  34.        alarm  returns  the amount of time previously remaining in
  35.        the alarm clock of the calling process, or 0 if  no  alarm
  36.        was scheduled.
  37.  
  38. N✓NO✓OT✓TE✓E
  39.        This  call only works when MiNT is active; under TOS, zero
  40.        is always returned.
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. MiNT docs 0.1              3 March 1993                         1
  65.  
  66.  
  67.